package domain;

public class Roommate extends ModelObject {
	
	private String name;
	private boolean oftenUsed;
	
	public Roommate(String name, boolean oftenUsed) {
		this.name = name;
		this.oftenUsed = oftenUsed;
	}
	
	public Roommate() {
	}

	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	/**
	 * @return the oftenUsed
	 */
	public boolean isOftenUsed() {
		return oftenUsed;
	}

	/**
	 * @param oftenUsed the oftenUsed to set
	 */
	public void setOftenUsed(boolean oftenUsed) {
		this.oftenUsed = oftenUsed;
	}

	@Override
	public String toString() {
		return this.name;
	}

	public Roommate clone() {
		Roommate newRoommate = new Roommate();
		newRoommate.setId(getId());
		newRoommate.setVersion(getVersion());
		newRoommate.setName(getName());
		return newRoommate;
	}
}
